<template>
  <div class="dp1">
    <el-carousel indicator-position="outside" height="150px">
      <el-carousel-item v-for="item in lunbo" :key="item">
        <img :src="item" class="dp2" @click="movieInfo" />
      </el-carousel-item>
    </el-carousel>
  </div>
</template>
<script setup>
import router from '../../../../router'
import '@/assets/scss/userCom/Phone/carosel.scss'
const lunbo = [
  require('@/assets/img/轮播/中国机长.jpg'),
  require('@/assets/img/轮播/侏罗纪世界3.jpg'),
  require('@/assets/img/轮播/奇迹笨小孩.jpeg'),
  require('@/assets/img/轮播/月球陨落.jpg'),
  require('@/assets/img/轮播/这个杀手不太冷静.jpg'),
  require('@/assets/img/轮播/长津湖之水门桥.jpg')
]
const movies = [
  '中国机长',
  '侏罗纪世界3',
  '奇迹笨小孩',
  '月球陨落',
  '这个杀手不太冷静',
  '长津湖之水门桥'
]
const movieInfo = (index) => {
  sessionStorage.setItem('movieInfo', JSON.stringify(movies[index]))
  router.push('/movieInfo')
}
</script>

